using System;
using System.Web.Caching;
using BoxBinary.AspectCache.Core.CacheManagement;

namespace BoxBinary.AspectCache.Core.PolicyDefinition
{
    /// <summary>
    /// Speciifes members representing a cache entry together with a description of its priority and cache storage mechanism
    /// </summary>
    public interface IPolicyBoundCachePackage
    {
        /// <summary>
        /// The cache entry key.
        /// </summary>
        string Key { set; get; }

        /// <summary>
        /// The object to be cached.
        /// </summary>
        object Item { set; get; }

        /// <summary>
        /// The absolute expiration date and time of the cache item.
        /// </summary>
        DateTime AbsoluteExpiration { set; get; }

        /// <summary>
        /// DateTime that the item was first cached.
        /// </summary>
        DateTime ItemCachedDateStamp { get; set; }

        /// <summary>
        /// Specifies the relative priority of items stored in the <see cref="T:System.Web.Caching.Cache"></see> object.
        /// </summary>
        CacheItemPriority Priority { set; get; }

        /// <summary>
        /// The path on which the cache entry depends. If this path changes, the cache entry is invalidated.
        /// </summary>
        string CacheDependencyPath { set; get; }

        /// <summary>
        /// The mechanism for storing the cache entry.
        /// </summary>
        CacheStoreMechanism CacheStore { get; set; }
    }
}